{% set globals = app.generic.modelData('Global variables') %}

<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<title>Northern Legal</title>
		
		{% block init %}{% endblock %}
		
		<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
		<script src="/js/jquery.min.js"></script>
		<script src="/js/jquery.dropotron.min.js"></script>
		<script src="/js/skel.min.js"></script>
		<script src="/js/skel-layers.min.js"></script>
		<script src="/js/init.js"></script>
		<noscript>
			<link rel="stylesheet" href="/css/skel.css" />
			<link rel="stylesheet" href="/css/style.css" />
			<link rel="stylesheet" href="/css/style-desktop.css" />
		</noscript>
		<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
		<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
		<style>
			#logo a { height: 8.5em !important; }
			#logo span { line-height: 1.0em !important; margin-top: 10%; }
			#logo span { line-height: 1.0em !important; }
			.lang { float: right; border: 1px solid #ddd;  background: #fff; padding: 5px 10px; color: #000; }
			.lang a { color: #333; margin-right: 10px; }
			.lang a.selected { font-weight: bold; }
		</style>
		{% block extraHead %}{% endblock %}
		<script>
		  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
		
		  ga('create', 'UA-60914244-1', 'auto');
		  ga('send', 'pageview');
		</script>
	</head>
	
	<body class="homepage">
		<div id="header-wrapper">
		
			<div class="lang">
				{% set langData = app.generic.modelData('Language', '', [], { 'sort': 'rank', 'order': 'ASC' }) %}
				{% for itm in langData['_data'] %}
					<a {{ itm.urlFragment == lang ? 'class="selected"' : '' }} href="/{{ itm.urlFragment }}/{{ urlFragment ~ (urlFragment == '' ? '' : ((param) ? '/' ~ param ~ '/' : '/')) }}">{{ itm.title }}</a>
				{% endfor %}
				{#<label>Choose language</label>
				<select id="lang-select" autocomplete="off" >
					{% set langData = app.generic.modelData('Language', '', [], { 'sort': 'rank', 'order': 'ASC' }) %}
					{% for itm in langData['_data'] %}
						<option {{ itm.urlFragment == lang ? 'selected' : '' }} value="{{ itm.urlFragment }}">{{ itm.title }}</option>
					{% endfor %}
				</select>#}
			</div>
			
			<div id="header" class="container">
				<h1 id="logo">
					<a href="/{{ lang }}/">
						<span style="font-size: 150%;">
							<div style="letter-spacing: 0px;">Northern Legal</div>
							<b>Lawyers</b>
						</span>
					</a>
				</h1>
				<nav id="nav">
					{{ nav|nav2(lang)|raw }}
				</nav>
			</div>
		</div>
			
		{% block content %}{% endblock %}
		
		<div id="footer-wrapper" style="padding: 0;">
			<div id="copyright" class="container" style="padding-bottom: 0;">
				&copy; Northern Legal Lawyers. All rights reserved.
				<div>&nbsp;</div>
			</div>
		</div>

		<script>
			$(function() {
				$('#lang-select').on('change', function() {
					location.href = '/' + $(this).val() + '/{{ urlFragment ~ (urlFragment == '' ? '' : ((param) ? '/' ~ param ~ '/' : '/')) }}';
				});
			});
		</script>
	</body>
</html>